﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/Layouts/Admin.Master" AutoEventWireup="true"
    CodeBehind="YearBonusConfig.aspx.cs" Inherits="MLM.AdminCP.Pages.YearBonusConfig" meta:resourcekey="PageResource1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Label ID="LabelName" runat="server" Text="Year Bonus Config" meta:resourcekey="LabelNameResource1"></asp:Label>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <telerik:RadGrid ID="RadYearBonusConfigsGrid" runat="server" AllowFilteringByColumn="True"
        DataSourceID="YearBonusConfigEds" AllowPaging="True" AllowSorting="True" GridLines="None"
        ShowGroupPanel="True"  AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
        AllowAutomaticDeletes="True" ShowFooter="True" ShowStatusBar="True" meta:resourcekey="RadYearBonusConfigsGridResource1">
        <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True">
            <Selecting AllowRowSelect="True" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings>
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="Id" DataSourceID="YearBonusConfigEds"
            ShowHeader="true" ShowHeadersWhenNoRecords="true" AllowAutomaticInserts="true"
            CommandItemDisplay="TopAndBottom">
            <CommandItemSettings ShowAddNewRecordButton="true" ShowRefreshButton="true">
                <%--ExportToPdfText="Export to Pdf">--%></CommandItemSettings>
            <RowIndicatorColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="Id" DataType="System.Int64" HeaderText="ID" ReadOnly="True"
                    SortExpression="Id" UniqueName="Id" Visible="true" meta:resourcekey="ID">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="MinPVPerYear" HeaderText="Min PV Require (PV)"
                    SortExpression="MinPVPerYear" UniqueName="MinPVPerYear" meta:resourcekey="MinPVPerYear">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Bonus" HeaderText="Bonus (%)" SortExpression="Bonus"
                    UniqueName="Bonus" meta:resourcekey="Bonus">
                </telerik:GridBoundColumn>
                <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"
                    meta:resourcekey="GridEditCommandColumnResource1">
                    <ItemStyle CssClass="MyImageButton"></ItemStyle>
                </telerik:GridEditCommandColumn>
                <telerik:GridButtonColumn ConfirmText="Delete this?" ConfirmDialogType="RadWindow"
                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                    UniqueName="DeleteColumn" meta:resourcekey="GridButtonColumnResource1">
                    <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"></ItemStyle>
                </telerik:GridButtonColumn>
            </Columns>
            <EditFormSettings EditFormType="Template">
                <EditColumn UniqueName="EditCommandColumn1">
                </EditColumn>
                <FormTemplate>
                    <table id="Table2" style="border-collapse: collapse; padding-left: 20">
                        <tr style="height: 30px">
                            <td class="titlename">
                                <asp:Label ID="Label1" runat="server" Text="Min PV Require" CssClass="MLMLabel" meta:resourcekey="LabelName22Resource1"></asp:Label>
                            </td>
                            <td style="width: 50">
                                <telerik:RadTextBox CssClass="radtextbox" ID="RadTextBox2" runat="server" Text='<%# Bind("MinPVPerYear") %>'
                                    LabelCssClass="" meta:resourcekey="RadTextBox2Resource1">
                                </telerik:RadTextBox>PV
                            </td>
                            <td>
                                <asp:Label ID="Label2" runat="server" Text="Bonus" CssClass="MLMLabel" meta:resourcekey="LabelName22Resource1sas"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadNumericTextBox CssClass="radtextbox" ID="RadTextBox3" 
                                    runat="server" Text='<%# Bind("Bonus") %>'
                                    LabelCssClass="" meta:resourcekey="RadTextBox2Resource1" Culture="en-US">
                                </telerik:RadNumericTextBox>%
                            </td>
                        </tr>
                        <tr>
                            <td style="padding-bottom: 10; padding-top: 10" colspan="2">
                                <asp:Button ID="btnUpdate" Text='Save' runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                                    meta:resourcekey="btnUpdateResource111"></asp:Button>&nbsp;
                                <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                    CommandName="Cancel" meta:resourcekey="btnCancelResource1"></asp:Button>
                            </td>
                        </tr>
                    </table>
                </FormTemplate>
            </EditFormSettings>
        </MasterTableView>
        <HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Office2007">
        </HeaderContextMenu>
    </telerik:RadGrid>
    <asp:EntityDataSource ID="YearBonusConfigEds" runat="server" ConnectionString="name=MLMDataContext"
        DefaultContainerName="MLMDataContext" EnableDelete="True" EnableFlattening="False"
        EnableInsert="True" EnableUpdate="True" EntitySetName="YearBonusConfigs">
    </asp:EntityDataSource>  
    <h3>
        
        <asp:Label ID="lbexample" runat="server" Text="Example" 
            meta:resourcekey="lbexampleResource1"></asp:Label></h3>
    <p>
        1% above 500.000 PV per Year<br />
        1,5% above 1.000.000 PV per Year<br />
        2% above 1.500.000 PV per Year<br />
        2,5% above 2.000.000 PV per Year<br />
    </p>
</asp:Content>
